package ua.maxicash.dao;

import ua.maxicash.vo.Message;

import java.util.List;
import java.util.Set;

public interface MessageDao {

	public List<Message> listMessages();

	public List<Message> getAllReceivedMessages(String receiversEmail);

    public Set<Message> getReceivedMessages(Long idReceiver, Long offset, Long amount);

    public long getCountOfReceivedMessages(String receiversEmail);

    public long getCountOfSentMessages(String sendersEmail);

	public List<Message> getAllSentMessages(String sendersEmail);

    public Set<Message> getSentMessages(Long idSender, Long offset, Long amount);

	public long getCountOfUnreadMessages(String userEmail);

    public Message getMessageById(Long idMessage, boolean markAsRead);

    public void markMessageAsRead(Long idMessage);

    public void saveMessage(Message message);
}
